import './App.css';
import { useHistory } from 'react-router-dom';
function App() {
  const history = useHistory()
  const switchRou = (param) => {
    if (param === "redux") {
      return history.push("/reduxcom")
    } else if (param === 'react-redux') {
      return history.push("/reactredux")
    }
    history.push("/firstcom")
  }
  return (

        <div className="App">
          <div onClick={() => switchRou()}> demo</div>
          <div onClick={() => switchRou('redux')}> reduxdemo</div>
          <div onClick={() => switchRou('react-redux')}> react-redux</div>
        </div>
  );
}

export default App;
